package com.ruoyi.agent.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.agent.mapper.AgentMapper;
import com.ruoyi.agent.domain.Agent;
import com.ruoyi.agent.service.IAgentService;

/**
 * 客服Service业务层处理
 * 
 * @author dxl
 * @date 2025-01-08
 */
@Service
public class AgentServiceImpl implements IAgentService 
{
    @Autowired
    private AgentMapper agentMapper;

    /**
     * 查询客服
     * 
     * @param agentId 客服主键
     * @return 客服
     */
    @Override
    public Agent selectAgentByAgentId(Long agentId)
    {
        return agentMapper.selectAgentByAgentId(agentId);
    }

    /**
     * 查询客服列表
     * 
     * @param agent 客服
     * @return 客服
     */
    @Override
    public List<Agent> selectAgentList(Agent agent)
    {
        return agentMapper.selectAgentList(agent);
    }

    /**
     * 新增客服
     * 
     * @param agent 客服
     * @return 结果
     */
    @Override
    public int insertAgent(Agent agent)
    {
        return agentMapper.insertAgent(agent);
    }

    /**
     * 修改客服
     * 
     * @param agent 客服
     * @return 结果
     */
    @Override
    public int updateAgent(Agent agent)
    {
        return agentMapper.updateAgent(agent);
    }

    /**
     * 批量删除客服
     * 
     * @param agentIds 需要删除的客服主键
     * @return 结果
     */
    @Override
    public int deleteAgentByAgentIds(Long[] agentIds)
    {
        return agentMapper.deleteAgentByAgentIds(agentIds);
    }

    /**
     * 删除客服信息
     * 
     * @param agentId 客服主键
     * @return 结果
     */
    @Override
    public int deleteAgentByAgentId(Long agentId)
    {
        return agentMapper.deleteAgentByAgentId(agentId);
    }
}
